package com.frogs.ucenter.v1.request;

import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.web.api.request.Request;
import com.frogs.system.web.exception.RequestIllegalException;

public class UserFamilyMemberTagShowRequest extends Request {

	private static final long serialVersionUID = -3505125359826847202L;

	private int memId;
	private int userId;
	
	/** */
	public UserFamilyMemberTagShowRequest() {
	}

	@Override
	public void parse(HttpServletRequest request) {
		
		HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		
		
		this.userId = requestInfo.getIntParameter(ApiUrlParamEnum.userId.getParamName(), -1);
		if( userId < 1 ) {
			throw new RequestIllegalException("error userId:"+userId);
		}
		
		this.memId = requestInfo.getIntParameter(ApiUrlParamEnum.familyMemberId.getParamName(), -1);
		if( memId <= 0 ) {
			throw new RequestIllegalException("error userId:"+memId);
		}

	}
	
	public int getUserId() {
		return userId;
	}
	
	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getMemId() {
		return memId;
	}

	public void setMemId(int memId) {
		this.memId = memId;
	}
	
}
